﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="ItemEventHandler"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
	<DocumentationLinks>
		<xi:include href="BaseEventsDocumentation.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:DocumentationLinks/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
	</DocumentationLinks>
	<xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
	<Caption>Item Event Handler</Caption>
	<Description>Adds a event handler to react of event like ItemAdded, ItemUpdating etc.</Description>
	<HostData Priority="10">
		<Icon File="Help/Icons/icon_Events.ico" />
    <CommandBar Menu="SPSFProjectEvents"/>
    <CommandBar Menu="SPSFFolderEvents"/>
		<spsf:MetaData
		  Visible="true"
		  BindingType="ElementManifestReference"
		  BindingTypeTemplate="ElementManifestReferenceTemplate"
		  TestType="BaseWebFeatureRecipeRunner"
		  Enabled="true"
		  CreateVSTemplate="true"
		  FeatureScopes="Web;Site"
		  Category="Events" xmlns:spsf="http://www.spalmblogger.de">
			<spsf:Authors>
				<spsf:Author>Torsten Mandelkow</spsf:Author>
				<spsf:Author>Matthias Einig</spsf:Author>
			</spsf:Authors>
			<spsf:VersionHistory>
				<spsf:VersionHistoryEntry>1.1 Updated Documentation</spsf:VersionHistoryEntry>
				<spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
			</spsf:VersionHistory>
			<spsf:WebPageContent>
				<![CDATA[Creates a ItemEventHandler.]]>
			</spsf:WebPageContent>
			<spsf:Test>
				<spsf:TestCases>
					<spsf:TestCase Name="Default">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="EventHandlerName">ItemEvent</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="EventHandlerTypes">ItemAdding;ItemAdding;ItemAdding|ItemDeleting;ItemDeleting;ItemDeleting</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
					</spsf:TestCase>
					<spsf:TestCase Name="ItemEventWithScopeSite" Type="SolutionTestCase">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="EventHandlerName">ItemEventWithScopeSite</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="EventHandlerTypes">ItemAdding;ItemAdding;ItemAdding|ItemDeleting;ItemDeleting;ItemDeleting</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="EventHandlerScope">Site</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
					</spsf:TestCase>
					<spsf:TestCase Name="ItemEventWithRootWebOnly">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="EventHandlerName">ItemEventWithRootWebOnly</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="EventHandlerTypes">ItemAdding;ItemAdding;ItemAdding|ItemDeleting;ItemDeleting;ItemDeleting</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="EventHandlerRootWebOnly">True</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
					</spsf:TestCase>
				</spsf:TestCases>
			</spsf:Test>
		</spsf:MetaData>
	</HostData>
	<Arguments>

		<Argument Name="EventHandlerTypes" Type="NameValueItemArray" Required="true" >
			<Converter XPath="/RecipeParameters/SPEventReceivers/SPItemEventReceiver" Type="RecipeParametersConverter" />
			<ValueProvider Type="DefaultNameValueCollectionProvider"  />
		</Argument>

		<Argument Name="TemplatePathFeatureCode" Type="System.String">
			<ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="Text\Events\FeatureReceiverCode.xml.t4"/>
		</Argument>

		<xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="BaseEventsArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

	</Arguments>

	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SharePointSoftwareFactory.Library" />
				<xi:include href="BaseEventsPages.include"  parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/p:Pages/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
			</Pages>
		</Wizard>
	</GatheringServiceData>

	<xi:include href="BaseEventsActions.include" xmlns:xi="http://www.w3.org/2001/XInclude" />

</Recipe>


